/**
 * Created by John on 2016/7/6.
 */
var mongo = new Mongo('localhost');
var newDB = mongo.getDB('BeginningMongoDB');

var collections = newDB.getCollectionNames();
print('Initial Collections');
printjson(collections);

newDB.createCollection('newCollectionA');
newDB.createCollection('newCollectionB');
print('After Collection Creation: ');

collections = newDB.getCollectionNames();
printjson(collections);